package com.xmtlxx.tms.mapper;

import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.tms.domain.WaybillLog;
import com.xmtlxx.tms.domain.bo.WaybillLogBo;
import com.xmtlxx.tms.domain.vo.WaybillLogVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 运单日志Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface WaybillLogMapper extends BaseMapperPlus<WaybillLogMapper, WaybillLog, WaybillLogVo> {
    /**
     * 根据条件分页查询运单日志
     *
     * @param waybillLog 运单日志
     * @return Page WaybillLog
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "u.user_name"),
//        @DataColumn(key = "deptName", value = "w.dept_id"),
//        @DataColumn(key = "userName", value = "u.user_name")
//    })
    Page<WaybillLogVo>  selectPageWaybillLogList(@Param("page") Page<WaybillLog> page,@Param("waybillLog") WaybillLogBo waybillLog);

    /**
     * 查询运单日志列表
     *
     * @param waybillLog 运单日志
     * @return 运单日志集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "w.create_by"),
//        @DataColumn(key = "deptName", value = "w.dept_id"),
//        @DataColumn(key = "userName", value = "w.create_by")
//    })
    List<WaybillLogVo> selectWaybillLogList(@Param("waybillLog") WaybillLogBo waybillLog);

    List<WaybillLogVo> selectWaybillLogs(String waybillId);

    WaybillLogVo selectWaybillLogVoByID(String id);

    List<WaybillLog> selectWaybillLogListByWid(@Param("waybillLog") WaybillLogBo waybillLog);

    int updateWaybillLog(@Param("waybillLog") WaybillLog waybillLog);

    int updateWaybillLogBatchById(@Param("list") List<WaybillLog> waybillLog);

    void removeWaybillLogBatch(@Param("list") List<WaybillLog> waybillLog);
}
